<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width" />
    <title>Media Chrome Basic Video Usage Example</title>
    <script type="module" src="../../dist/index.js"></script>
    <style>
      /** add styles to prevent CLS (Cumulative Layout Shift) */
      media-controller:not([audio]) {
        display: block;         /* expands the container if preload=none */
        max-width: 960px;       /* allows the container to shrink if small */
        aspect-ratio: 2.4;   /* set container aspect ratio if preload=none */
      }

      video {
        width: 100%;      /* prevents video to expand beyond its container */
      }

      .examples {
        margin-top: 20px;
      }

      /** (optional) add style to change default behavior when showing/hiding controls */
      media-controller {
        --media-control-transition-out: opacity 0.125s ease-in-out;
        --media-control-transition-in: opacity 0.2s ease-in-out;
      }
    </style>
  </head>
  <body>
    <main>
      <h1>Media Chrome - Basic Video Usage Example</h1>

      <media-controller>
        <video
          playsinline
          slot="media"
          src="https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/high.mp4"
        ></video>
        <media-poster-image
          slot="poster"
          src="https://image.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/thumbnail.jpg"
          placeholdersrc=""
        ></media-poster-image>
        <media-loading-indicator slot="centered-chrome" noautohide></media-loading-indicator>
        <media-control-bar>
          <media-play-button></media-play-button>
          <media-mute-button></media-mute-button>
          <media-volume-range></media-volume-range>
          <media-time-display></media-time-display>
          <media-time-range></media-time-range>
          <media-duration-display></media-duration-display>
          <media-playback-rate-button></media-playback-rate-button>
          <media-fullscreen-button></media-fullscreen-button>
        </media-control-bar>
      </media-controller>

      <div class="examples">
        <a href="./">View more examples</a>
      </div>
    </main>
  </body>
</html>
